import request from "@/utils/request";

export function getAttendanceSallaryTemplateInfo(params) {
  return request({
    url: "/hr/api/v1/attendanceSallaryTemplateItems/getAttendanceSallaryTemplateInfo",
    method: "GET",
    params
  });
}
export function delAttendanceSallaryTemplateItems(attendanceSallaryTemplateItemId) {
  return request({
    url: `/hr/api/v1/attendanceSallaryTemplateItems/${attendanceSallaryTemplateItemId}`,
    method: "delete"
  });
}

export function getASTIListAll(params) {
  return request({
    url: "/hr/api/v1/attendanceSallaryTemplateItems/listAll",
    method: "GET",
    params
  });
}

export function postBatchSave(data) {
  return request({
    url: "/hr/api/v1/attendanceSallaryTemplateItems/batchSave",
    method: "post",
    data
  });
}

export function putBatchUpdate(data) {
  return request({
    url: "/hr/api/v1/attendanceSallaryTemplateItems/batchUpdate",
    method: "put",
    data
  });
}

export function getAttendanceDataTempAllAndError(params) {
  return request({
    url: "/hr/api/v1/attendanceDataTemps/getAttendanceDataTempAllAndError",
    method: "GET",
    params
  });
}

export function getCalculateSalary(recordId) {
  return request({
    url: `/hr/api/v1/attendanceDataTemps/calculateSalary/${recordId}`,
    method: "get"
  });
}
